import {getInfo,setInfo,removeInfo} from '@/utils/storage'


const state = {
  userInfo: getInfo()
}

const mutations = {
    setUserInfo (state,userInfo) {
      state.userInfo = userInfo
      setInfo(userInfo)
    },
    removeUserInfo(state){
      state.userInfo=null
      removeInfo()
    }
}

const actions = {
  
}

const getters = {}

export default {
  namespaced: true,//开启命名空间
  state,
  mutations,
  actions,
  getters
} 